package com.sky.controller.admin;

import com.sky.result.Result;
import com.sky.service.ShopService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * 店铺相关
 */
@RestController(value = "adminShopController")
@RequestMapping("/admin/shop")
public class ShopController {

    @Autowired
    private ShopService shopService;
    /**
     * 设置当前店铺状态
     * @param status
     * @return
     */
    @PutMapping("/{status}")
    public Result setStatus(@PathVariable Integer status){
        return shopService.setStatus(status);
    }

    /**
     * 查询管理端店铺状态
     * @return
     */
    @GetMapping("/status")
    public Result getStatus(){
        return shopService.getStatus();
    }
}
